package com.wtcrazy.service;

import com.baomidou.mybatisplus.extension.service.IService;

import com.wtcrazy.entity.*;
import com.wtcrazy.utils.JsonResult;

import java.util.List;

//业务层,存放业务逻辑处理,不直接对数据库进行操作,有接口和接口实现类,提供controller层调用的方法。
public interface IUserService extends IService<User> {
    JsonResult login(User user);//extends是扩展,implements是实现

    JsonResult deleteMyself(String uid);

    JsonResult register(User user);

    JsonResult findPassword(Object obj);

    String sendMailCode(String mail);

    JsonResult checkToken(String token);

    List<Object> getAllPosts();

    List<Object> getAllHotPosts();

    List<Object> getLimitPosts(Integer startIndex, Integer pageSize);

    List<Object> getLimitHotPosts(Integer startIndex, Integer pageSize);

    Post getPost(String id);

    Post uploadPost(Post post);

    String deletePost(String postid);

    String addPostView(String id);

    PostLike isLikePost(PostLike postLike);

    PostLike likePost(PostLike postLike);

    String unLikePost(PostLike postLike);

    String updatePostLike(String jsonStr);

    String updatePostComment(String jsonStr);

    List<String> getMyPosts(String uid);

    List<Object> getLimitMyPosts(Object obj);

    List<Object> getLimitMyHotPosts(Object obj);

    Object updateUserInfo(Object obj);

    List<PostLike> getUserAllLikePosts(Object obj);

    Comment submitComment(Comment comment);

    List<Comment> getAllCommment(String id);

    List<Comment> getAllSecondCommment(String postId, String replyCommentId);

    Object deleteComment(Object obj);

    void changePostComment(Object obj);

    List<Comment> getUserComment(Object obj);

    List<Article> getLimitArticle(Integer classid, Integer page, Integer pageSize);

    Article getArticle(String id);

    Integer querySecondCommentNum(String commentId);

    Integer getUserInfoLike(String uid);

    Integer getUserInfoPost(String uid);

    Integer getUserInfoComment(String uid);
}
